<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>		
		<link rel="stylesheet" type="text/css" href="css/base.css"/>
		<script type="text/javascript" href="js/jquery-1.11.0.js"></script>
		<style type="text/css">
			#title{
				line-height: 50px;
				text-align: center;
			}
			pre{
				word-wrap:break-word; 
				word-break:break-all; 
				line-height: 20px;
			}
			
			.toolbar{width: 8px; height: 100%;background-color:#F1F1F1; }
			.toolbar,.navi{position: fixed; right: 0;}
			.navi{ width: 35px; z-index: 0;top: 250px;position: fixed;}
			.navi li{ list-style: none;width: 50px; height: 35px; margin-top: 1px; position: relative;  }
			.navi a{line-height: 35px; text-align: center; width: 60px; height: 35px; 
			position: absolute; right:12px; top: 0; z-index: 5;}
			
		</style>
	</head>
	<body>
		
	<div class="content">

 		<div class="toolbar"></div> 
		<ul class="navi">
			<li><a href="article?op=collect&uname=${name }" >收藏(${collectCount })</a></li>
			<li><a href="article?op=praise&uname=${name }">点赞(${praiseCount })</a></li>
		</ul>
	</div>
		
		<div id="title"><span style="font-size: 20px;">${articleData.title }</span></div>
		<div style="width: 80%; margin: auto;" >
<pre>
${articleContent }	

</pre>
<div style =" font-size:20px;width : 100%;height:30px;margin-top:10px;margin-left:30px;text-align:center">
    <a href= "main?uname=${name }">返回主页</a>
</div>
	<div>
		<c:forEach items="${comments}" var="commentData">	
		           用户名:<a href="#" style="line-height: 20px;">${commentData.uname }</a><br />
			评论内容:<span style="line-height: 20px;">${commentData.context }</span><br />
			<p>${commentData.date }</p><br />  
		</c:forEach>
		
		当前总评论量:${commentCount }<br />
	</div>	
	
		发布评论
		<form action="article?op=comment&uname=${name }&pid=${articleData.pid }">
			<div style="width:100%;height: 200px; margin: auto; background-color: #F4F4FF;border: 1px solid #BBBDBF;"><span style="color:#666666;font-family: 宋体;line-height: 30px;">发表评论:</span>
				<input style="height: 20px;width: 50px;" type="submit" value="提交"/>
				<div style="width: 95%; height: 70%;margin: auto;">
				<table style="width: 100%;height: 100%;">
					<tr >
						<td><textarea name="comment" style="width: 100%;height: 95%; top: 0; position:relative;"></textarea></td>
					</tr>
				</table>
				</div>
			</div>
		</form>
	</div> 
	</body>
</html>
